package com.akkainaction.remote.rpc.server;

import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Props;
import akka.actor.UntypedActor;
import com.typesafe.config.ConfigFactory;

public class UserServerActor extends UntypedActor {

    @Override
    public void onReceive(Object msg) throws Exception {
        if (msg instanceof String){
            System.out.println(msg);
        }else {
            unhandled(msg);
        }
    }

    public static void main(String[] args) {
        ActorSystem system = ActorSystem.create("sys", ConfigFactory.load("remote-server.conf"));
        ActorRef userServerActor = system.actorOf(Props.create(UserServerActor.class), "userServerActor");
    }
}
